home *** CD-ROM | disk | FTP | other *** search
- \ Sets the mouse to return cursor movement codes when it is moved.
- \ This lets you move the cursor around with the mouse. This works
- \ both in Emacs and in the Forth line editor. Try it out. I don't
- \ like it, but perhaps you will.
- \
- \ KEYMOUSE ( -- ) Use mouse to move editing cursor
- \ RELMOUSE ( -- ) Restore normal mouse action
-
- \ Don't FORGET this stuff once it's loaded, or the system will hang when
- \ you exit (because RELMOUSE is installed in the exit list).
-
- decimal
- 0 xbios: initmous { a.vec a.param w.type -- }
- 34 xbios: kbdvbase { -- a.struct }
-
- : keymouse ( -- )
- th 00041030 pad !
- \ 00xxxxxx 0 at top of screen
- \ xx04xxxx mouse buttons act like keys
- \ xxxx10xx sensitivity 16 mouse clicks in x direction
- \ xxxxxx30 sensitivity 48 mouse clicks in y direction
- kbdvbase 4 la+ @ ( mouse-vec ) pad 4 initmous \ keycode mode
- ;
- : relmouse ( -- ) \ Puts the mouse back to normal
- th 00000101 pad !
- \ 0 at top, normal buttons, sensitivity 1 in x and y
- kbdvbase 4 la+ @ ( mouse-vec ) pad 1 initmous \ relative mode
- ;
-
- \ Automatically reset the mouse back to normal upon exit.
- : (bye relmouse (bye ; ' (bye is bye
-